<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of MainView
 *
 * @author mateusz.ledzewicz
 */
class ViewNetwork extends NetworkScreen{
    //put your code here
        
    public function load() {
        parent::load();
        $this->chooseView('network');
        
    }
    
    protected function listLoad() {
        $list = '
            <tr>
                <td>'.$this->getVar('header_Network_LABEL_file').'</td>
                <td>'.$this->getVar('header_Network_LABEL_structure').'</td>
                <td>Edycja</td>
            </tr>';
        
        foreach($this->specialVariables['list'] as $r)
        {
            $list .= '
            <tr>
                <td>'.$r->file.'</td>
                <td>'.$r->structure.'</td>
                <td>
                    <a href="?step=network_prepared&action=edit&parent='.$r->id_network.'"><span class="glyphicon glyphicon-new-window" aria-hidden="true"></span></a>
                </td>
            </tr>';     

         }
         
         
         $this->setVar('addNewLink', '<a href="?step=network&action=edit">Dodaj nowe</a>');
         $this->setVar('type', 'podstawowe');
         $this->setVar('list', $list);
    }
  
}

?>
